package engine

import (
	"fmt"
	"test_demo/reptile/v1/fetcher"
)

func Worker(r Request) (ParseResult,error) {

	body,err := fetcher.Fetcher(r.Url)
	if err != nil {
		fmt.Printf("请求[%s]失败：%s",r.Url,err)
		return ParseResult{},err
	}
	return r.Parse.Parser(body,r.Url),nil
}
